package com.thinkinghead.mahjongrecorder.model;

import java.util.Date;

import android.os.Parcel;
import android.os.Parcelable;

public class Record implements Parcelable {

	private int imageID = -1;
	private Date recordDT = null;
	private String objectID = "";
	private String nameP1 = "";
	private String nameP2 = "";
	private String nameP3 = "";
	private String nameP4 = "";
	private String description = "";
	private User createdBy = null;

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel p, int flags) {
		p.writeLong(recordDT.getTime());
		p.writeString(objectID);
		p.writeString(nameP1);
		p.writeString(nameP2);
		p.writeString(nameP3);
		p.writeString(nameP4);
		p.writeString(description);
		// private User createdBy = null;

	}

	public static final Parcelable.Creator<Record> CREATOR = new Creator<Record>() {
		public Record createFromParcel(Parcel source) {
			Record li = new Record();
			li.recordDT = new Date(source.readLong());
			li.objectID = source.readString();
			li.nameP1 = source.readString();
			li.nameP2 = source.readString();
			li.nameP3 = source.readString();
			li.nameP4 = source.readString();
			li.description = source.readString();
			return li;
		}

		public Record[] newArray(int size) {
			return new Record[size];
		}
	};

	public Date getRecordDT() {
		return recordDT;
	}

	public void setRecordDT(Date recordDT) {
		this.recordDT = recordDT;
	}

	public String getObjectID() {
		return objectID;
	}

	public void setObjectID(String objectID) {
		this.objectID = objectID;
	}

	public String getNameP1() {
		return nameP1;
	}

	public void setNameP1(String nameP1) {
		this.nameP1 = nameP1;
	}

	public String getNameP2() {
		return nameP2;
	}

	public void setNameP2(String nameP2) {
		this.nameP2 = nameP2;
	}

	public String getNameP3() {
		return nameP3;
	}

	public void setNameP3(String nameP3) {
		this.nameP3 = nameP3;
	}

	public String getNameP4() {
		return nameP4;
	}

	public void setNameP4(String nameP4) {
		this.nameP4 = nameP4;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public void setImageID(int i) {
		imageID = i;
	}

	public int getImageID() {
		return imageID;
	}

}